package basic_class_01.common;

/**
 * @Auther: xujianfeng
 * @Date: 2018/10/12 09:59
 * @Description:
 */
public class Utils {

    public static boolean isEqual(int[] arr1, int[] arr2) {
        boolean isNull = (arr1 == null && arr2 != null) || (arr1 != null && arr2 == null);
        if (isNull) {
            return false;
        }
        if (arr1 == null && arr2 == null) {
            return true;
        }
        if (arr1.length != arr2.length) {
            return false;
        }
        for (int i = 0; i < arr1.length; i++) {
            if (arr1[i] != arr2[i]) {
                return false;
            }
        }
        return true;
    }
}
